package com.winspread.app.hitl.binds

import androidx.room.Insert
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent
import dagger.hilt.android.scopes.ActivityScoped
import dagger.hilt.components.SingletonComponent
import javax.inject.Qualifier
import javax.inject.Singleton

/**
 *Author: Amin
 *Data: 2022/4/19 11:10
 *
 *Description:
 *
 */


@Qualifier
annotation class BookModelSingle

@Qualifier
annotation class BookModelCondition



@InstallIn(SingletonComponent::class)
@Module
abstract class BookModel {
    @BookModelSingle
    @Binds
    abstract fun getIBook(impl: BookImpl): IBook
}


//其模块范围为Activity
@InstallIn(ActivityComponent::class)
@Module
abstract class BookConditionModel {
    @BookModelCondition
    @Binds
    abstract fun getConditionIBook(impl: BookConditionImpl): IBook
}

